import { post, get, upload } from '@/axios'
import { PostTest, ObjectType, Channel, newsList,newsDetail } from '@/axios/types'
/**
 * Test1示例
 */
export const test1 = () => {
  return get('/api/test/test.php')
}

/**
 * Test2示例
 */
export const test2 = (data: PostTest) => {
  return post('/api/test/test2.php', data);
}
// 获取全站配置信息
export const getConfig = () => get('/common/get_config')
export const uploadOss = (data: any) => upload('/api/api/uploadOss',data)
// 首页数据
export const getHome = () => get('/index/home')

// 获取视频推荐
export const getVideo = () => get('/common/get_video')
// 获取项目详细信息
export const getdetail = (id:string) => get(`/project/detail?id=${id}`)
// 获取新闻推荐
export const getNews = () => get('/index/news')
// 招聘职位信息
export const getRecruits = (parasm: ObjectType) => get('/recruit/get_recruits', parasm)
// 提交应聘简历
export const pushRecruit = (data: ObjectType) => post('/recruit/push_recruit', data)


//项目中心
// 项目分类
export const getClassify = () => get('/project/classify');
// 根据分类ID获取对应的项目
export const getProjectsList = (parasm: ObjectType) => get('/project/list_by_classify', parasm);
// 
export const getProjects = () => get('/project/get_projects');

// 专题数据
// 红色家书
export const getLetter = () => get('/special/do_letter')
// ppp专题页
export const getPPP = () => get('/special/get_ppp')
// 健康中国
export const  getHealth = () => get('/special/get_healthy')
//新闻
// 新闻列表
export const getNewsList = (data:newsList) => get('/news/list',data)
// 新闻详情
export const getNewsDetail = (data:newsDetail) => get('/news/detail',data)
// 新闻详情的底部推荐
export const getNewsPropsal = () => get('/news/detail_proposal')
// 相关案例
export const getCaseList = () => get('/news/case')
// 通用接口
// 资讯热榜
export const getHotList = () => get('/common/get_top_list')

// 图文类案例的新闻接口
export const getCaseNews = () => get('/index/news')



